﻿namespace TrueSync.Physics2D
{
    public static class Settings
    {
        /// <summary>
        /// This is used to fatten AABBs in the dynamic tree. This allows proxies
        /// to move by a small amount without triggering a tree adjustment.
        /// This is in meters.
        /// </summary>
        public static FP AABBExtension = FP.EN1;

        public static FP Epsilon = FP.EN4;

        /// <summary>
        /// Defines the maximum number of iterations made by the GJK algorithm.
        /// </summary>
        public const int MaxGJKIterations = 20;

        public static TSVector2 Gravity = new TSVector2(0, new FP(-10) / new FP(3600));

        public static bool[,] CollisionMatrix = new bool[,]
        {
            //BodyPosition,BodyHit,BodyHitNoCollideWithFlySubitem,Throw,Attack,FlySubitemAttack,CounterAttack,CounterFlySubitem,Status,GuardAlarm
            {true, false, false, false, false, false, false, false, false, false },//BodyPosition
            {false, false, false, true, true, true, false, false, true, true },//BodyHit
            {false, false, false, true, true, false, false, false, true, true },//BodyHitNoCollideWithFlySubitem
            {false, true, true, false, false, false, false, false, false, false },//Throw
            {false, true, true, false, false, false, true, false, false, false },//Attack
            {false, true, false, false, false, false, false, true, false, false },//FlySubitemAttack
            {false, false, false, false, true, false, true, false, false, false },//CounterAttack
            {false, false, false, false, false, true, false, true, false, false },//CounterFlySubitem
            {false, true, true, false, false, false, false, false, false, false },//Status
            {false, true, true, false, false, false, false, false, false, false },//GuardAlarmRect
        };
    }
}
